<%@ Control Language="C#" AutoEventWireup="true" Inherits="CMS.Web.UI.UserControls.DownloadEditor" %>
<asp:UpdatePanel ID="upDownloadEditor" runat="server">
    <ContentTemplate>
        <asp:DropDownList ID="ddlCurrentFolder" runat="server" AutoPostBack="true" />
        <table>
        <tr>
            <td></td>
            <td>..</td>
            <td><a href="?Page=<%= Page.PageID %>&CurrentFolder=<%= ParentFolderQueryString %>"><img src="/Pics/CMS/FolderClosed.png" alt="Folder" /></a></td>
            <td></td>
        </tr>
        <asp:Repeater ID="repeaterDownloadFolder" runat="server">
            <ItemTemplate>
                <tr>
                    <td><a href="?Page=<%= Page.PageID %>&DownloadFolder=<%# Eval("DownloadFolderID") %>"><img src="/Pics/CMS/Edit.png" alt="Edit" /></a></td>
                    <td><%# Eval("FolderName") %></td>
                    <td><a href="?Page=<%= Page.PageID %>&CurrentFolder=<%# Eval("DownloadFolderID") %>"><img src="/Pics/CMS/FolderClosed.png" alt="Folder" /></a></td>
                    <td><a href="?Page=<%= Page.PageID %>&DeleteFolder=<%# Eval("DownloadFolderID") %>"><img src="/Pics/CMS/Delete.png" alt="X" /></a></td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
        <asp:Repeater ID="repeaterDownload" runat="server">
            <ItemTemplate>
                <tr>
                    <td><a href="?Page=<%= Page.PageID %>&Download=<%# Eval("DownloadID") %>"><img src="/Pics/CMS/Edit.png" alt="Edit" /></a></td>
                    <td><%# Eval("FileName") %></td>
                    <td><a href="<%# Eval("FilePath") %>"><img src="/Pics/CMS/BlankDocument.png" alt="Download" /></a></td>
                    <td><a href="?Page=<%= Page.PageID %>&Delete=<%# Eval("DownloadID") %>"><img src="/Pics/CMS/Delete.png" alt="X" /></a></td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
        </table>
    </ContentTemplate>
</asp:UpdatePanel>

<table>
    <tr>
        <td><asp:Label ID="lFileName" runat="server" Text="Name" /></td>
        <td><asp:TextBox ID="tbFileName" runat="server" /></td>
    </tr>
    <tr>
        <td colspan="2"><asp:Label ID="lFileDescription" runat="server" Text="Description" /></td>
    </tr>
    <tr>
        <td colspan="2"><asp:TextBox ID="tbFileDescription" TextMode="MultiLine" runat="server" /></td>
    </tr>
    <tr>
        <td><asp:Label ID="lFile" runat="server" Text="File" /></td>
        <td><asp:FileUpload ID="fuFile" runat="server" /></td>
    </tr>
    <tr>
        <td><asp:Label ID="lFolder" runat="server" Text="Folder" /></td>
        <td><asp:DropDownList ID="ddlFolder" runat="server" /></td>
    </tr>
    <tr>
        <td colspan="2"><asp:Button ID="bValidateFile" runat="server" Text="Validate File" /><asp:Button ID="bValidateFolder" runat="server" Text="Validate Folder" /></td>
    </tr>
</table>
